/*
*
==============================================================================
*  Name        : 
*  Part of     : Omen Game Engine
*  Description : 
*  Version     : 1.0
*
*  Copyright (c) 2013 Lauri Kortevaara.
* 
==============================================================================
*/

#pragma once

#include "OmenConfig.h"
#include "OmenMath.h"

namespace Omen
{
    class OMEN_API Frustum
    {
        private:
            // Plane indexes to the m_planes
            static const int   Near    = 0;
            static const int   Far     = 1;
            static const int   Left    = 2;
            static const int   Right   = 3;
            static const int   Top     = 4;
            static const int   Bottom  = 5;

        public:
            Frustum();
            virtual ~Frustum();
            
            virtual void create( Omen::Matrix4x4& viewMatrix, Omen::Matrix4x4& projectionMatrix, Omen::Float depth );

            virtual bool pointInside( Omen::Vector3d& pointCoord );
            virtual bool sphereInside( Omen::Sphere& sphere );
            virtual bool AABBInside( Omen::AABB& aabb );
            virtual bool boxInside( Omen::Box& box );

        protected:
        private:
            Omen::Plane m_planes[6];
                
    };
}